package com.example.mp.modular.system.controller;

import com.example.mp.core.common.SpringContextHolder;
import com.sun.jndi.toolkit.url.Uri;
import lombok.val;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.net.MalformedURLException;
import java.net.URL;
import java.sql.ResultSet;

@Controller
@RequestMapping(value = "/Hello")
public class HelloController {

    @Value("${spring.application.name}")
    private String profile;

    @GetMapping(value = "/index")
    public String index(ModelMap model) {
        model.addAttribute("env", profile);
        return "index";
    }
}
